/*
 *  Copright: 2008 Philipp Leitner, Distributed Systems Group,
 *            TU Wien, leitner@infosys.tuwien.ac.at
 *
 *  This file is part of DAIOS.
 *
 *  DAIOS is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation.
 * 
 *  DAIOS is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with DAIOS.  If not, see
 *  <http://www.gnu.org/licenses/>.
 * 
 */

package at.ac.tuwien.infosys.dsg.daios.framework.interfaces;

import at.ac.tuwien.infosys.dsg.daios.framework.structs.DaiosOutputMessage;

/**
 * This interface defines a Daios callback handler which is
 * used for client-side asynchrony. Client application
 * developers need to provide a specific implementation
 * of this interface to use the 'callback' invocation style.
 * 
 * @author philipp
 *
 */
public interface IDaiosCallback {
	
	/**
	 * This is the callback method that will get notified
	 * when the invocation ended <i>successfully</i>.
	 * 
	 * @param output The result of the successful
	 * invocation.
	 */
	public void onComplete(DaiosOutputMessage output);

	/**
	 * This is the callback method that will get notified
	 * when the invocation ended <i>unsuccessfully</i>, i.e.
	 * with an error. 
	 * 
	 * @param e The exception that has been thrown in the course
	 * of the invocation.
	 */
	public void onError(Exception e);
	
}